//2468 
package L3;

import java.util.Scanner;

public class TestPerson {
    public static void main(String[] args) {
        
        Person person = new Person("John",Person.MALE);
        person.setEmail("john@163.com");
        Scanner scanner = new Scanner(System.in);
        System.out.println("Enter John's phone:");
        person.setPhone(scanner.nextLine());
        scanner.close();
        System.out.println(person.toString());
        
    }  
}


class Person {
    public static final boolean MALE = false;
    public static final boolean FEMALE = true;
    private String name;
    private boolean gender;
    private String phone;
    private String email;
    Person() {}
    Person(String name) {
        this.name = name;
    }
    Person(String name, boolean gender){
        this.name = name;
        this.gender = gender;
    } 
    void setEmail(String email) {
        this.email = email;
    }
    void setPhone(String phone) {
        this.phone = phone;
    }
    public String getContact() {
        return String.format("%s;%s",email,phone);
    }
    public String toString(){
        String genderString = gender ? "Female" : "Male";
        return String.format("%s;%s;%s",name,genderString,getContact());
    }
}
